/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
}

body {
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* 头部样式 */
header {
  text-align: center;
  margin-bottom: 30px;
}

header h1 {
  font-size: 28px;
  color: #333;
  margin-bottom: 10px;
}

header p {
  font-size: 16px;
  color: #666;
}

/* 主要内容区域 */
.main-content {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 30px;
}

/* 标签页导航 */
.tab-nav {
  display: flex;
  background-color: #f0f2f5;
  border-bottom: 1px solid #e0e0e0;
}

.tab-nav button {
  flex: 1;
  padding: 15px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: #666;
  transition: all 0.3s;
}

.tab-nav button.active {
  background-color: #fff;
  color: #3498db;
  border-bottom: 2px solid #3498db;
}

.tab-nav button:hover:not(.active) {
  background-color: #e5e9ef;
}

/* 上传区域 */
.upload-section {
  padding: 30px;
  text-align: center;
}

.drop-area {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 40px 20px;
  margin: 20px 0;
  cursor: pointer;
  transition: all 0.3s;
}

.drop-area:hover, .drop-area.dragover {
  border-color: #3498db;
  background-color: rgba(52, 152, 219, 0.05);
}

.drop-area p {
  margin: 10px 0;
  color: #666;
}

.drop-area .icon {
  font-size: 48px;
  color: #3498db;
  margin-bottom: 10px;
}

.upload-btn {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.upload-btn:hover {
  background-color: #2980b9;
}

.file-input {
  display: none;
}

/* 预览区域 */
.preview-section {
  padding: 20px;
  display: none;
}

.preview-container {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.preview-image {
  max-width: 200px;
  max-height: 200px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-info {
  margin-top: 10px;
  font-size: 14px;
  color: #666;
}

/* 平台选择 */
.platform-section {
  padding: 20px;
  border-top: 1px solid #eee;
}

.platform-title {
  font-size: 18px;
  margin-bottom: 15px;
  color: #333;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.platform-item {
  display: flex;
  align-items: center;
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
}

.platform-item:hover {
  background-color: #f5f7fa;
}

.platform-item.selected {
  border-color: #3498db;
  background-color: rgba(52, 152, 219, 0.1);
}

.platform-item input {
  margin-right: 10px;
}

.platform-item label {
  cursor: pointer;
}

/* 生成按钮 */
.generate-section {
  padding: 20px;
  text-align: center;
  border-top: 1px solid #eee;
}

.generate-btn {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

.generate-btn:hover {
  background-color: #2980b9;
}

.generate-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* 结果区域 */
.result-section {
  padding: 20px;
  display: none;
  border-top: 1px solid #eee;
}

.result-title {
  font-size: 18px;
  margin-bottom: 15px;
  color: #333;
}

.result-tabs {
  display: flex;
  border-bottom: 1px solid #eee;
  margin-bottom: 20px;
}

.result-tab {
  padding: 10px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.result-tab.active {
  color: #3498db;
  border-bottom-color: #3498db;
}

.result-content {
  padding: 10px 0;
}

.result-group {
  margin-bottom: 30px;
}

.result-group-title {
  font-size: 16px;
  margin-bottom: 10px;
  color: #333;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 15px;
}

.result-item {
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.result-item:hover {
  transform: translateY(-3px);
}

.result-item img {
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
  border: 1px solid #eee;
  border-radius: 4px;
  padding: 5px;
  background-color: #fff;
}

.result-item .size-label {
  font-size: 12px;
  color: #666;
}

/* 下载按钮 */
.download-section {
  padding: 20px;
  text-align: center;
  border-top: 1px solid #eee;
}

.download-btn {
  background-color: #27ae60;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
  margin: 10px;
}

.download-btn:hover {
  background-color: #219955;
}

/* 加载动画 */
.loading {
  display: none;
  text-align: center;
  padding: 20px;
}

.spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 底部信息 */
footer {
  text-align: center;
  padding: 20px;
  color: #999;
  font-size: 14px;
}

footer a {
  color: #3498db;
  text-decoration: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }
  
  .platform-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  .result-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }
  
  .drop-area {
    padding: 20px;
  }
}

/* 通知消息 */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px;
  background-color: #3498db;
  color: white;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transform: translateX(120%);
  transition: transform 0.3s;
  z-index: 1000;
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  background-color: #27ae60;
}

.notification.error {
  background-color: #e74c3c;
}

/* 关于部分 */
.about-section {
  background-color: #f0f2f5;
  padding: 40px 20px;
  border-radius: 8px;
  margin-bottom: 30px;
}

.about-title {
  font-size: 24px;
  margin-bottom: 20px;
  color: #333;
}

.about-content {
  line-height: 1.8;
  color: #666;
}

.about-features {
  margin-top: 20px;
}

.about-features h3 {
  font-size: 18px;
  margin-bottom: 10px;
  color: #333;
}

.feature-list {
  list-style-type: none;
}

.feature-list li {
  margin-bottom: 10px;
  padding-left: 20px;
  position: relative;
}

.feature-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #27ae60;
} 